package move.net;

import util.ByteBuffer;
import backlet.ClientRequestHandler;
import bcenum.ClientMessageCode;
import connect.Transmitter;

public class MoveHandler implements ClientRequestHandler {

	public void handlerClient(int clientId, ByteBuffer data, int sessionId,
			long requestMill) 
	{
		int x = data.readInt();
    	int y = data.readInt();
    	int m = data.readInt();
    	int n = data.readInt();
    	
    	data.clear();
    	data.writeInt(ClientMessageCode.PLAYER.BID);
    	data.writeInt(ClientMessageCode.PLAYER.PLAYER_MOVE);
    	data.writeInt(sessionId);
    	data.writeInt(x);
    	data.writeInt(y);
    	data.writeInt(m);
    	data.writeInt(n);
    	
		Transmitter.sendToOthers(sessionId,data);
	}

}
